/**
 * Created by LML on 2017/4/11.
 */
import React, {Component} from 'react';
import {View, StyleSheet, Text, Image, Platform, TouchableOpacity, ScrollView} from  'react-native';
import  MoreCommonCell from './MoreCommonCell';
let ImageSetting = require('../../img/icon_mine_setting.png');
export default class More extends Component {
    render() {
        return (
            <View style={styles.container}>
                {this.renderNavBar()}
                <ScrollView>
                    <View style={{marginTop:20}}>
                        <MoreCommonCell title="扫一扫"/>
                    </View>

                    <View style={{marginTop:20}}>
                        <MoreCommonCell title="省流量模式" isSwitch={true}/>
                        <MoreCommonCell title="消息提醒"/>
                        <MoreCommonCell title="邀请好友"/>
                        <MoreCommonCell title="清空缓存" rightTitle="10.3M"/>
                    </View>

                    <View style={{marginTop:20}}>
                        <MoreCommonCell title="关于我们"/>
                        <MoreCommonCell title="意见反馈"/>
                        <MoreCommonCell title="问卷调查"/>
                        <MoreCommonCell title="支付帮助"/>
                        <MoreCommonCell title="网络诊断"/>
                    </View>

                    <View style={{marginTop:20}}>
                        <MoreCommonCell title="机器助手"/>
                        <MoreCommonCell title="联系客服"/>
                    </View>
                </ScrollView>
            </View>
        )
    }

    renderNavBar() {
        return (
            <View style={styles.navStyle}>
                <Text style={{color:'white',fontSize:20,fontWeight:'bold'}}>更多</Text>
                <TouchableOpacity onPress={()=>{alert("aa")}} style={styles.rightViewStyle}>
                    <Image source={ImageSetting} style={styles.navImageStyle}/>
                </TouchableOpacity>
            </View>
        )
    }
}
const styles = StyleSheet.create({
    container: {
        flex: 1,
        backgroundColor: '#e8e8e8',
    },
    textStyle: {
        fontSize: 20
    },
    navImageStyle: {
        width: Platform.OS == 'ios' ? 28 : 24,
        height: Platform.OS == 'ios' ? 28 : 24,

    },
    navStyle: {
        height: Platform.OS == 'ios' ? 64 : 50,
        backgroundColor: 'rgba(255,96,0,1.0)',
        flexDirection: 'row',
        alignItems: 'center',
        justifyContent: 'center'
    },
    rightViewStyle: {
        position: 'absolute',
        right: 10,
        bottom: 13
    }
});
